<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Ghasam.Business" namespace="Ghasam.Business.Domain.Entity">
    <class name="Loan" table="Loan" >
    <id name="Id" type="System.Int32" column="ID">
        <generator class="identity"/>
    </id>
    <many-to-one name="Employee" column="EmpId" class="Employee" update="0"  insert="0" />
    <property name="LoanAmount" column="LoanAmount" type="System.Int32" not-null="false" />
    <property name="LoanPaymentPeriod" column="LoanPaymentPeriod" type="System.Int32" not-null="false" />
    <property name="StartDate" column="StartDate" type="System.DateTime" not-null="false" />
    <property name="EndDate" column="EndDate" type="System.DateTime" not-null="false" />
    <property name="LoanDueDate" column="LoanDueDate" type="System.DateTime" not-null="false" />
    <bag name="AdjustmentPayments" table="AdjustmentPayment" inverse="true" lazy="true" cascade="delete">
    <key column="LoanId" />
    <one-to-many class="AdjustmentPayment"/>
    </bag>
 </class>
</hibernate-mapping>
